package Offer2018;

/**
 * Created by 雷文康 on 2018/3/3.
 */
public class Test10 {

    public static int countBit1(int num) {
        int count = 0;
        while (num != 0) {
            count++;
            num = num & (num - 1);
        }
        return count;
    }
}
